package com.ib.enumertion;

/**
 * Transaction type as supported by Bank.
 * 
 */
public enum TransactionType {

	BUY("BUY"), DEPOSIT("DEPOSIT"), SELL("SELL"), WITHDRAW("WITHDRAW");

	private String value;

	private TransactionType(String value) {
		this.value = value;

	}

	public static TransactionType fromValue(String value) {

		for (TransactionType aType : TransactionType.values()) {
			if (aType.value.equals(value)) {
				return aType;
			}
		}
		return null;
	}

	public String getValue() {
		return this.value;
	}
}
